<?php
use lvzmen\yii\cms\widgets\markdown\Markdown;
use lvzmen\yii\cms\widgets\markdown\Example;
use yii\bootstrap\Html;
use yii\bootstrap\Tabs;

$html = [
    "markdown0" => <<<M0
## 多行文本框
虽然是通过`bootstrap`完成的渲染，但是默认是不具备`bootstrap`样式的，需要手动添加`.form-control`才行，如下：
M0,
    "example0" => [
        "html" =>
            Html::textarea("city", "Hang Zhou", [
                "class" => "form-control"
            ])
        ,
        "yii" => <<<EY0
use yii\bootstrap\Html;
echo Html::textarea("city", "Hang Zhou", [
    "class" => "form-control"
]);
EY0,
        "bootstrap" => <<<EB0
<textarea class="form-control" name="city">
    Hang Zhou
</textarea>
EB0
    ],

];

foreach($html as $name => $item){
    switch ($name) {
        case strpos($name, "example") !== false:
            echo Example::widget($item);
            break;
        case strpos($name, "markdown") !== false:
            echo Markdown::widget(["content" => $item]);
            break;
        default:
            break;
    }
}